home *** CD-ROM | disk | FTP | other *** search
- Path: news.San-Jose.ate.slb.com!afzal
- From: afzal@San-Jose.ate.slb.com (Afzal Hossain)
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Please help: Borland C compiler on DOS memory allocation problem
- Date: 15 Apr 1996 22:09:53 GMT
- Organization: Schlumberger Technolgies
- Distribution: world
- Message-ID: <4kuhfh$k53@k9.San-Jose.ate.slb.com>
- Reply-To: afzal@San-Jose.ate.slb.com (Afzal Hossain)
- NNTP-Posting-Host: panther.san-jose.ate.slb.com
-
-
- Hi,
- I would appreciate any help regarding the following problem.
- It is a long mail. Thanks a lot.
-
- -Afzal Hossain
- ============================================================
-
-
-
- I am writing a 16-bit C program on DOS and using
- BCC (part of Borlad BC++ 4.0 compiler).
- The program itself requires huge amount of memory.
- Estimated data size (heap size ?) is about 12 MByte.
- Consecutive call to malloc demands a minimum of that
- amount of memory.
-
- I have been trying compiling my source modules with
- following options :
-
- bcc -v -mh -N -y -A -l-P -lc -lW -Yo <srcname>.c
-
- I put everything in alibrary and finally compile the executable module
- this way -
-
- bcc -v -mh -N -y -A -l-P -lc -lW -Y <srcexec>.c -Yo <libname>.lib
-
- As you can see I am already using "huge" memory model and code overlays/code
- swaping. It stll does not work. It gives a error message "malloc error" at
- a malloc check point. However the program actually breaks long before
- that by allocating same memory space to several malloc. Therefore one
- overwriting on another's space. Following is the system configuration. I added 8 MB
- more memory because I first thought that was the problem. It didn't do any good.
-
- Pentium 133 MB System
- Windows 95 restarted in DOS mode.
- Borlad BC++ 4.0 compiler BCC command line compiler
- 8 MB memory + Added additional 8 MB just incase it could be of
- any help. (system now boots with 16 MB)
-
-
- I now have following question:
-
- 1. Is the program (requiring 12 MB heap) feasible on a DOS based PC?
- 2. What are my choices -
-
-
- Thanks again.
-
-
-